using System;
using miPics.Common;


public partial class UserControl_GalleryListItem : System.Web.UI.UserControl
{
	public string Name
	{
		set { _Name.InnerText = value; }
	}

	public string Description
	{
		set { _Description.InnerText = value; }
	}

	public int ImageCount
	{
		set { _ImageCount.InnerHtml = "Images: " + value; }
	}

	public int GalleryID
	{
		set
		{
			_Name.HRef = _GalleryImageLink.HRef = "~/Gallery/?id=" + value;
			_EditLink.HRef = "~/Administration/EditGallery.aspx?id=" + value;
			_DeleteLink.HRef = "~/Administration/DeleteGallery.aspx?id=" + value;
		}
	}

	public string GalleryImageSrc
	{
		set
		{
			if (value == null)
			{
				// set the 'no gallery image' image
				_GalleryImage.Src = Config.General.NoGalleryImageSrc;
				_GalleryImage.Width = Config.Image.WidthThumbnail;
				_GalleryImage.Height = Config.Image.HeightThumbnail;
				_GalleryImage.Alt = Config.General.NoGalleryImageName;
			}
			else
			{
				_GalleryImage.Src = "~/_Resource/Image/" + value;
			}
		}
	}

	public string GalleryImageName
	{
		set { _GalleryImage.Alt = ToolKit.GetAltImageName(value); }
	}

	public int GalleryImageWidth
	{
		set { _GalleryImage.Width = value; }
	}

	public int GalleryImageHeight
	{
		set { _GalleryImage.Height = value; }
	}

	public bool EditMode
	{
		set { _EditOption.Visible = value; }
	}
}